import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("address_scope_city", { schema: "cbox" })
export class AddressScopeCity {
  @PrimaryGeneratedColumn({ type: "int", name: "id" })
  id: number;

  @Column("varchar", { name: "city_name", length: 100 })
  cityName: string;

  @Column("varchar", { name: "city_code", length: 20 })
  cityCode: string;

  @Column("varchar", { name: "province_name", length: 100 })
  provinceName: string;

  @Column("varchar", { name: "province_code", length: 20 })
  provinceCode: string;

  @Column("int", { name: "sort", nullable: true, default: () => "'0'" })
  sort: number | null;

  @Column("tinyint", {
    name: "enabled",
    nullable: true,
    width: 1,
    default: () => "'1'",
  })
  enabled: boolean | null;

  @Column("tinyint", {
    name: "is_hot",
    nullable: true,
    width: 1,
    default: () => "'0'",
  })
  isHot: boolean | null;

  @Column("tinyint", {
    name: "is_default",
    nullable: true,
    width: 1,
    default: () => "'0'",
  })
  isDefault: boolean | null;

  @Column("varchar", { name: "first_name", nullable: true, length: 30 })
  firstName: string | null;
}
